package com.jt.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum logOperation {
    one("0","入库"),
    two("1","出库");
    @Getter
    private final String code;

    @Getter
    private final String value;

    public static logOperation of(String code) {
        if (code != null) {
            for (logOperation s : logOperation.values()) {
                if (s.getCode().equals(code)) {
                    return s;
                }
            }
        }
        return null;

    }
}
